package com.xbts.system.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xbts.system.domain.CnInvoiceManagement;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * 帮助中心Service接口
 *
 * @author xbts
 * @date 2023-08-07
 */
public interface ICnInvoiceManagementService extends IService<CnInvoiceManagement> {


    /**
     * 查询发票
     *
     * @return invoiceManagement表
     */
    List<CnInvoiceManagement> selectCnInvoiceManagement(CnInvoiceManagement cnInvoiceManagement);

    /**
     * 新增发票
     *
     * @param cnInvoiceManagement 发票
     * @return 结果
     */
    boolean insertCnInvoiceManagement(CnInvoiceManagement cnInvoiceManagement);

    /**
     * 删除invoiceManagement发票
     *
     * @param invoiceManagementId 主键id
     * @return 结果
     */
    boolean deleteContentById(Long invoiceManagementId);

    /**
     * 批量删除invoiceManagement发票
     *
     * @param ids 多个主键id
     * @return 结果
     */
    boolean batchDeleteContentById(List<Long> ids);

    /**
     * 更新invoiceManagement发票
     *
     * @param cnInvoiceManagement 发票
     * @return 结果
     */
    boolean updateInvoiceManagement(CnInvoiceManagement cnInvoiceManagement, MultipartFile file);

    /**
     * 申请开票
     * @param cnInvoiceManagement@return 结果
     */
    boolean applyForInvoicing(CnInvoiceManagement cnInvoiceManagement);

    /**
     * 处理发票
     *
     * @param url 图片地址
     * @param file
     * @return 结果
     */
    boolean updateFileUrl(String url, Long invoiceId, MultipartFile file);

    /**
     * 批量删除发票
     *
     * @param ids 发票ID集合
     * @return 结果
     */
    boolean batchDelete(List<Long> ids);


    /**
     * 导出用户发票信息
     *
     * @param response 响应
     * @param invoiceManagement 发票信息
     */
    void download(HttpServletResponse response, CnInvoiceManagement invoiceManagement);

    /**
     * 邮件发送测试
     * @param email 邮箱号
     * @param fileUrl 文件地址
     */
    void testSendEmail(String email, String fileUrl);
}
